<?php


namespace App\Http\Requests\Warehouse\PackageStock;


use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StoreRequest
    extends FormRequest
{
    /**
     * @return array
     * @author luffyzhao@vip.126.com
     */
    public function rules()
    {
        return [
            'package_id'=> ['required', Rule::exists('package', 'id')],
            'type'=> ['required', 'numeric', 'in:0,1'],
            'stock'=> ['required', 'numeric'],
            'remark' => ['nullable'],
        ];
    }
}
